package android.malware.ransonware.routine.channel;

import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.malware.ransonware.MainActivity;
import android.malware.ransonware.R;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;

public class IntentTunnel extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

		int notificationId = 001;
		Intent viewIntent = new Intent(context, MainActivity.class);
		PendingIntent viewPendingIntent = PendingIntent.getActivity(context, 0,
				viewIntent, 0);

		NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(
				context).setSmallIcon(R.drawable.ic_launcher)
				.setContentTitle("Hey you ! :)")
				.setContentText("POC Android malware ransonware")
				.setContentIntent(viewPendingIntent);

		NotificationManagerCompat notificationManager = NotificationManagerCompat
				.from(context);

		notificationManager.notify(notificationId, notificationBuilder.build());

	}

}
